/**
 * Created by 都大爽 on 2017/8/7.
 */
import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

//路由懒加载
const Dashboard = resolve => require(['./pages/dashboard.vue'], resolve);
const Award = resolve => require(['./pages/award/award.vue'], resolve);
const AwardCompany = resolve => require(['./pages/award-company/awardCompany.vue'], resolve);
const FamousSchool = resolve => require(['./pages/famous-school/famousSchool.vue'], resolve);
const FamousTeacher = resolve => require(['./pages/famous-teacher/famousTeacher.vue'], resolve);
const Student = resolve => require(['./pages/student/student.vue'], resolve);
const Teacher = resolve => require(['./pages/teacher/teacher.vue'], resolve);
const Company = resolve => require(['./pages/company/company.vue'], resolve);

export default new VueRouter({
    routes: [
        {path: '/', component: Dashboard},
        {path: '/award', component: Award},
        {path: '/award-company/:id', component: AwardCompany},
        {path: '/famous-school', component: FamousSchool},
        {path: '/famous-teacher', component: FamousTeacher},
        {path: '/student', component: Student},
        {path: '/teacher', component: Teacher},
        {path: '/company', component: Company},
    ],
    linkActiveClass: 'active'
});